From d3954f614c99a9a886c7d57fa92ef39753c7ff79 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Javier=20Jard=C3=B3n?= Date: Fri, 4 Aug 2017 15:11:36 +0100 Subject: [PATCH] Use gtk_show_uri_on_window() instead gtk_show_uri() --- gtk/gtkfilechooserwidget.c | 5 +++-- gtk/gtkprintoperation-unix.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index c31e52e5d0..346e3f42ae 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -1767,18 +1767,19 @@ open_folder_cb (GSimpleAction *action, gpointer data) { GtkFileChooserWidget *impl = data; + GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (impl)); GSList *files; files = get_selected_files (impl); /* Sigh, just use the first one */ - if (files) + if (files && gtk_widget_is_toplevel (toplevel)) { GFile *file = files->data; gchar *uri; uri = g_file_get_uri (file); - gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (impl)), uri, gtk_get_current_event_time (), NULL); + gtk_show_uri_on_window (GTK_WINDOW (toplevel), uri, gtk_get_current_event_time (), NULL); g_free (uri); } diff --git a/gtk/gtkprintoperation-unix.c b/gtk/gtkprintoperation-unix.c index 9baf69438e..dee683f7a5 100644 --- a/gtk/gtkprintoperation-unix.c +++ b/gtk/gtkprintoperation-unix.c @@ -312,7 +312,7 @@ gtk_print_operation_unix_launch_preview (GtkPrintOperation *op, g_error_free (error); error = NULL; uri = g_filename_to_uri (filename, NULL, NULL); - gtk_show_uri (screen, uri, GDK_CURRENT_TIME, &error); + gtk_show_uri_on_window (parent, uri, GDK_CURRENT_TIME, &error); g_free (uri); } -- 2.30.2